package com.channelsoft.springbootyiburenwu.serivce;

import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;

@Service
public class AsyncService {

    //告诉spring这是一个异步的方法
    @Async
    public void hello(){

        try {
            Thread.sleep(3000);
        }catch (InterruptedException e){

        }
        System.out.println("数据正在处理");

    }


}
